home *** CD-ROM | disk | FTP | other *** search
- # NWRAINet, Inc. PPP script
- # note: this script is also written to handle SLIP
- # in case this provider ever supports it. At
- # the moment, it appears to be a PPP-only provider.
- # Copyright 1995 Quarterdeck Corporation
- # 5-9-95
-
- STRING username
- STRING password
- STRING framing
- STRING IPAddress
-
- SetTimeOut 90
-
- CfgGetValue "Username" username
- IF result = 0 THEN
- GetInput "Enter your username:" username
- IF result = 0 THEN
- PRINT "Warning, no username entered."
- ELSE
- PRINT "Username set to: ";username
- ENDIF
- ENDIF
-
- CfgGetValue "Password" password
- IF result = 0 THEN
- GetPassword "Enter your password:" password
- IF result = 0 THEN
- PRINT "Warning, no password entered."
- ELSE
- PRINT "Password set."
- ENDIF
- ENDIF
-
- CfgGetValue "Framing" framing
- IF result = 0 THEN
- ABORT "Can't read 'Framing' setting from QDECK.INI."
- ENDIF # don't wait for spaces
-
- CommWaitFor "login:" # not case sensitive
- CommSend username
- IF framing = "MPPPP" THEN
- CommSend "P" # ask for PPP
- #ELSE
- # CommSend "S" # otherwise ask for SLIP
- ENDIF
-
- CommSend "%r"
-
- CommWaitFor "password:"
- CommSend password
- CommSend "%r"
-
- IF framing = "MPSLIP" THEN
- CommWaitFor "to"
- CommReadIPAddr IPAddress
- IF result < 7 THEN # IP Address length test
- ABORT "%rMissing or invalid IP Address."
- ENDIF
- CfgSetValue "IPAddress" ipaddress
- PRINT "%rIP Address set to:"; ipaddress
- ENDIF
-
- END
-